from datetime import datetime

from sqlalchemy import Column, String, Integer, DateTime, Float

from api.utils.base import Base


class Dialog(Base):
    __tablename__ = "t_dialog"
    id = Column(String, primary_key=True)
    name = Column(String, comment="对话名称")
    description = Column(Integer, comment="描述")
    icon = Column(Integer, comment="图标Base64")
    language = Column(String, comment="语言")
    llm_id = Column(String, comment="LLM ID")
    llm_setting = Column(String, comment="LLM参数")
    prompt_type = Column(String, comment="提示类型")
    prompt_config = Column(String, comment="提示配置")
    similarity_threshold = Column(Float, comment="相似度阈值")
    vector_similarity_weight = Column(Float, comment="向量权重")
    top_n = Column(Integer, comment="返回数量")
    top_k = Column(Integer, comment="检索数量")
    do_refer = Column(String, comment="引用开关")
    rerank_id = Column(String, comment="重排序模型")
    kb_ids = Column(String, comment="知识库集合")
    status = Column(String, comment="状态")